Imports Microsoft.VisualBasic

Namespace MyDAO
    Public Class MyInnerJoinRelation
        Inherits MyDataRelationBase

        Public Sub New(ByVal table As MyDataTableBase, ByVal leftKey As String, ByVal rightKey As String)
            MyBase.New()
            Me.Table = table
            Me.AddCondition(MyLogicalOperator.MyAnd, CreateCondition(New MyColumnExpression(leftKey), MyEqualityOperator.Equal, New MyColumnExpression(rightKey)))
        End Sub

        Public Overrides Function ToString() As String
            Return String.Format("inner join {0} on {1} ", Me.Table, Me.Condition)
        End Function
    End Class

End Namespace

